SetBackdropText(2, " Install/De-Install created using Setup Builder Version 4.01.002| Copyright ⌐ 1993 - 1996 G.Plowman|", 0, 1, 17, 255, 255, 255)
// Now display the appropriate backdrop
GetScreenWidth(%Width%)
IF %Width% == 640 ShowBackDrop("", 0, 0, 0)
IF %Width% == 640 GOTO :DONEBACKDROP
IF %Width% == 800 ShowBackDrop("", 0, 0, 0)
IF %Width% == 800 GOTO :DONEBACKDROP
IF %Width% == 1024 ShowBackDrop("", 0, 0, 0)
IF %Width% == 1024 GOTO :DONEBACKDROP
// Display default backdrop if screen size not recognised
ShowBackDrop("", 0, 0, 0)
:DONEBACKDROP
// Determine if s/w is already installed
CheckExists("%InstallPath%DEINST.INF")
SET %Installed% = %ERROR%
// Welcome Dialog
SET %Message1%="Welcome to the %Application% Installation Program."
SET %Message2%="This program will install the %Application% software in the directory you specify on your hard disk."
SET %Message3%="(Compuserve ID: 100105,536)||Setup is supplied with the Setup Builder|software and is the copyright of G.Plowman"
DialogBox("Welcome")
IF %ERROR% == IDCANCEL GOTO :EXIT
// De-Installation option
:BACK
SET %Message1%="Please make a selection from the following options:"
SET %Message2%="Install the %Application% software"
SET %Message3%="Un-Install the %Application% software"
DialogBox("DEINSTALL")
IF %ERROR%==IDCANCEL GOTO :EXIT
IF %ERROR%==IDBUTTON2 GOTO :DEINSTALL
// Ask the user where to install the software
// but only if the software isn't already installed
IF %Installed% == TRUE GOTO :INSTALLED
:RETRY
SET %Message1%="The install program will copy the %Application% files into the following directory:"
DialogBox("AskPath")
IF %ERROR% == IDBACK GOTO :BACK
IF %ERROR% == IDCANCEL GOTO :EXIT
:INSTALLED
// Check for space availability
GetDiskSpace(%InstallDrive%)
SET %Space% = %ERROR%
IF %Space% >= 872448 GOTO :GOTSPACE
MessageBox("The %Application% software requires 872448 bytes of disk space and there is only %Space% bytes free on your %InstallDrive% drive.||Do you wish to continue to install the software ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
// Now setup a new program manager group and its icons
MessageBox("Setup can create a Program Manager group|for the %Application% application.||Do you wish to create a Program|Manager group and icons ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
MessageBox("Setup can install a file association|for File Manager with .INF files.||Do you wish to install this association ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
MessageBox("The %Application% software is about to be removed from your machine.||All files, directories and the appropriate Program Manager Group will be deleted.||Are you sure you wish to continue ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
IF %ERROR% == IDYES GOTO :DODELETE
SET %Message1% = "De-installation aborted - the %Application% software has not been deinstalled."